<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SampleWebsite.Areas.UserAdministration.Models.UserAdministration.RoleViewModel>" %>

<asp:Content ContentPlaceHolderID="TitleContent" runat="server">
	Role: <% =Html.Encode(Model.Role) %>
</asp:Content>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">

	<link href='<% =Url.Content("~/Content/MvcMembership.css") %>' rel="stylesheet" type="text/css" />

    <h2>Role: <% =Html.Encode(Model.Role) %></h2>
    <div class="mvcMembership-roleUsers">
        <div class="form_settings">
		    <% if(Model.Users.Count() > 0){ %>
			    <ul>
				    <% foreach(var user in Model.Users){ %>
				    <li>
					    <span><% =Html.ActionLink(user.UserName, "Details", new{id=user.ProviderUserKey}) %></span>
					    <% using(Html.BeginForm("RemoveFromRole", "UserAdministration", new{id = user.ProviderUserKey, role = Model.Role})){ %>
						    <input type="submit" value="Remove From" />
					    <% } %>
				    </li>
				    <% } %>
			    </ul>
		    <% }else{ %>
		    <p>No users are in this role.</p>
		    <% } %>
	    </div>
    </div>

</asp:Content>